<template>
  <div class="qualityteam-container">
    <!-- 顶部标题 -->
    <el-row justify="center" class="header-row">
      <el-col :span="24" class="title">一冷运营区域质量日报</el-col>
    </el-row>

    <!-- 质量问题情况 -->
    <el-row :gutter="16" class="main-tables">
      <el-col :span="24">
        <el-card shadow="hover" class="stat-card">
          <div class="card-title">质量问题情况</div>
          <el-table :data="mainTargetData" border size="small">
            <el-table-column prop="itema" label="单元" align="center" width="120"/>
            <el-table-column prop="itemb" label="归户" align="center"  width="120"/>
            <el-table-column label="一级" align="center" >
              <el-table-column prop="A1" label="当日" width="100" align="center"/>
              <el-table-column prop="A2" label="累计" width="100" align="center"/>
           </el-table-column>
           <el-table-column label="二级" align="center" >
              <el-table-column prop="B1" label="当日" width="100" align="center"/>
              <el-table-column prop="B2" label="累计" width="100" align="center"/>
           </el-table-column>
           <el-table-column label="三级" align="center" >
              <el-table-column prop="C1" label="当日" width="100" align="center"/>
              <el-table-column prop="C2" label="累计"width="100" align="center"/>
           </el-table-column>
           <el-table-column label="公司一级" align="center" >
              <el-table-column prop="D1" label="当日" width="100" align="center"/>
              <el-table-column prop="D2" label="累计" width="100" align="center"/>
           </el-table-column>
           <el-table-column label="公司二级" align="center" >
              <el-table-column prop="E1" label="当日" width="100" align="center"/>
              <el-table-column prop="E2" label="累计" width="100" align="center"/>
           </el-table-column>
           <el-table-column label="公司三级及以上" align="center" >
              <el-table-column prop="F1" label="当日" width="100" align="center"/>
              <el-table-column prop="F2" label="累计" width="100" align="center"/>
           </el-table-column>
          </el-table>
        </el-card>
      </el-col>
    </el-row>

    <!-- 柱状图 -->
    <el-row :gutter="16" class="sub-tables">
      <el-col :span="8">
        <el-card shadow="hover" class="stat-card">
          <div class="tcm1-mid-mid-card2-graph common-div-card">
              <graph-bar-other
                :data1="CarSteelOne1"
                :data2="CarSteelOne2"
                :datax="CarSteelOnex"
                :title="'一级'"
                :max="10000"
                :min="0"
              />
            </div>
        </el-card>
      </el-col>

      <el-col :span="8">
        <el-card shadow="hover" class="stat-card">
          <div class="tcm1-mid-mid-card2-graph common-div-card">
              <graph-bar-other
                :data1="CarSteel1"
                :data2="CarSteel2"
                :datax="CarSteelx"
                :title="'二级'"
                :max="10000"
                :min="0"
              />
            </div>
        </el-card>
      </el-col>

      <el-col :span="8">
        <el-card shadow="hover" class="stat-card">
          <div class="tcm1-mid-mid-card2-graph common-div-card">
              <graph-bar-other
                :data1="speProdSteel1"
                :data2="speProdSteel2"
                :datax="speProdSteelx"
                :title="'三级'"
                :max="10000"
                :min="0"
              />
            </div>
        </el-card>
      </el-col>
    </el-row>



     <!-- 柱状图 -->
     <el-row :gutter="16" class="sub-tables">
      <el-col :span="8">
        <el-card shadow="hover" class="stat-card">
          <div class="tcm1-mid-mid-card2-graph common-div-card">
              <graph-bar-other
                :data1="CarSteelOne1"
                :data2="CarSteelOne2"
                :datax="CarSteelOnex"
                :title="'公司一级'"
                :max="10000"
                :min="0"
              />
            </div>
        </el-card>
      </el-col>

      <el-col :span="8">
        <el-card shadow="hover" class="stat-card">
          <div class="tcm1-mid-mid-card2-graph common-div-card">
              <graph-bar-other
                :data1="CarSteel1"
                :data2="CarSteel2"
                :datax="CarSteelx"
                :title="'公司二级'"
                :max="10000"
                :min="0"
              />
            </div>
        </el-card>
      </el-col>

      <el-col :span="8">
        <el-card shadow="hover" class="stat-card">
          <div class="tcm1-mid-mid-card2-graph common-div-card">
              <graph-bar-other
                :data1="CarSteel1"
                :data2="CarSteel2"
                :datax="CarSteelx"
                :title="'公司三级及以上'"
                :max="10000"
                :min="0"
              />
            </div>
        </el-card>
      </el-col>
    </el-row>


  </div>
</template>

<script setup lang="ts">
  import { ref } from 'vue';
  import GraphBarOther from '../components/GraphBarOther.vue';


//表格数据
  const mainTargetData = [
    { itema: '酸轧',itemb: '生产', A1: 100, A2: 154,B1: 110, B2: 167,C1: 120,C2: 247, D1: 130, D2: 347, E1: 147,E2: 258,F1:247,F2:374 },
    { itema: '酸轧',itemb: '设备', A1: 120, A2: 457,B1: 123, B2: 110,C1: 214,C2: 120, D1: 147, D2: 130, E1: 472,E2: 460,F1:345,F2:520 },
    { itema: '普冷',itemb: '生产', A1: 100, A2: 154,B1: 110, B2: 167,C1: 120,C2: 247, D1: 130, D2: 347, E1: 147,E2: 258,F1:247,F2:374 },
    { itema: '普冷',itemb: '设备', A1: 120, A2: 457,B1: 123, B2: 110,C1: 214,C2: 120, D1: 147, D2: 130, E1: 472,E2: 460,F1:345,F2:520 },
    { itema: '镀锌',itemb: '生产', A1: 100, A2: 154,B1: 110, B2: 167,C1: 120,C2: 247, D1: 130, D2: 347, E1: 147,E2: 258,F1:247,F2:374 },
    { itema: '镀锌',itemb: '设备', A1: 120, A2: 457,B1: 123, B2: 110,C1: 214,C2: 120, D1: 147, D2: 130, E1: 472,E2: 460,F1:345,F2:520 },
    { itema: '超博',itemb: '生产', A1: 100, A2: 154,B1: 110, B2: 167,C1: 120,C2: 247, D1: 130, D2: 347, E1: 147,E2: 258,F1:247,F2:374 },
    { itema: '超博',itemb: '设备', A1: 120, A2: 457,B1: 123, B2: 110,C1: 214,C2: 120, D1: 147, D2: 130, E1: 472,E2: 460,F1:345,F2:520 },
    { itema: '保障',itemb: '磨辊', A1: 100, A2: 154,B1: 110, B2: 167,C1: 120,C2: 247, D1: 130, D2: 347, E1: 147,E2: 258,F1:247,F2:374 },
    { itema: '保障',itemb: '公辅', A1: 120, A2: 457,B1: 123, B2: 110,C1: 214,C2: 120, D1: 147, D2: 130, E1: 472,E2: 460,F1:345,F2:520 },
    { itema: '保障',itemb: '运转', A1: 100, A2: 154,B1: 110, B2: 167,C1: 120,C2: 247, D1: 130, D2: 347, E1: 147,E2: 258,F1:247,F2:374 },

    { itema: '其它',itemb: '', A1: 344, A2: 457,B1: 178, B2: 110,C1: 214,C2: 120, D1: 147, D2: 130, E1: 472,E2: 460,F1:345,F2:520 },
    { itema: '合计',itemb: '', A1: 3214, A2: 5471,B1: 7895, B2: 6547,C1: 6587,C2: 9547, D1: 3657, D2: 7485, E1: 8526,E2: 5874,F1:6523,F2:6985 },
  ];

  
  //柱状图数据
  const CarSteelOne1 = ref<any>([587, 741]); 
  const CarSteelOne2 = ref<any>([654, 854]); 
  const CarSteelOnex = ref<any>(['生产', '设备']);

  //柱状图数据
  const speProdSteel1 = ref<any>([5475, 8547]); 
  const speProdSteel2 = ref<any>([7456, 3247]); 
  const speProdSteelx = ref<any>(['生产', '设备']);

  //柱状图数据
  const CarSteel1 = ref<any>([156, 151]);
  const CarSteel2 = ref<any>([257, 255]); 
  const CarSteelx = ref<any>(['生产', '设备']);
  
  onBeforeMount(() => {});
</script>

<style lang="less" scoped>
  @border-radius: 8px;
  @primary-color: #2c69e8;
  @box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  @box-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  @border:1px solid #dcdfe6;

  .qualityteam-container {
    padding: 18px 18px 0 18px;
    background: #f6f8fa;
  }
  .header-row .title {
    font-size: 2rem;
    font-weight: bold;
    color: #009966;
    letter-spacing: 0.5em;
    text-align: center;
    margin-bottom: 18px;
  }
  .card-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  .stat-card {
    margin-bottom: 16px;
  }
  .device-issue-row {
    margin-bottom: 16px;
  }
  .device-issue-card {
    background: #fffbe6;
  }
  .device-issue-content {
    color: #333;
    font-size: 0.98rem;
    line-height: 1.7;
    margin-top: 8px;
  }
  .bottom-card {
    margin-top: 18px;
  }
  .search-bar {
    margin-bottom: 0;
  }
  .center-panel {
  width: 33.33%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}
.center-row {
  width: 100%;
  height: 50%;
}
.card-bj{
  background-image: url('/src/assets/images/cut331.png');
  height: 26px;
  padding-top:5px;
  margin-bottom: 4px;
}
.tcm1-mid-mid-card2-graph {
    height: 25vh;
    width: 100%;
    margin-top: 1vh;
    box-shadow: @box-shadow;
    border-radius: @border-radius;
  }
</style>
